package com.story.story_serve.controller.Book;

import com.story.story_pojo.Book.BookComment;
import com.story.story_pojo.Book.BookCommentList;
import com.story.story_serve.service.Book.BookCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName:  BookCommentController
 * description:
 *
 * @ author:郭海龙
 * @ Create：2024/6/4 12:59
 * @ Version:1.0
 */
@RestController
public class BookCommentController {
    @Autowired
    private BookCommentService bookCommentService;

    // 添加评论
    @RequestMapping("/addBComment")
    public String addBComment(BookComment bookComment){
        return bookCommentService.addBComment(bookComment);
    }

    // 显示评论
    @RequestMapping("/showBComment")
    public List<BookCommentList> showBComment(Integer bId){
        return bookCommentService.showBComment(bId);
    }
}
